﻿
using IdentityModel;
using IdentityModel.Client;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Models.Common;
using Models.Identity;
using Models.JsonResultModel;
using Models.WebClient;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Net.Http.Headers;
using System.Security.Principal;
using UtilsORM;
using UtilsORM.MySqlData;
using ServiceWeb.APIRequest;
using ServiceWeb.DBGateway;
using UtilsBase;
using FileServer.Controllers.API.Common;

namespace FileServer.Controllers.API.Mobile
{
    [Route("api/mobile/[controller]/[action]")]
    [ApiController]
    // [BasicAuthentication]
    public class CommandController : ApiCommonControllerBase
    {


        /// <summary>
        /// 获取设备
        /// </summary>
        /// <param name="dguid"></param>
        /// <returns></returns>
        /// 


        public RespResultData getCommands(string dguid)
        {
            iot_device device = new DBIotDevice().getDevice(dguid);
            return RespResult.Sucess(new DBIotDeviceCommand().getCommandByModeBytype(device.d_model_guid, 0));
        }

    }
}
